package io.wit.modules.wit.service.impl;

import io.wit.modules.wit.dao.MarketDao;
import io.wit.modules.wit.entity.MarketEntity;
import io.wit.modules.wit.service.MarketService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;



@Service("marketService")
public class MarketServiceImpl implements MarketService {
	@Autowired
	private MarketDao marketDao;
	
	@Override
	public MarketEntity queryObject(Long dataId){
		return marketDao.queryObject(dataId);
	}
	
	@Override
	public List<MarketEntity> queryList(Map<String, Object> map){
		return marketDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return marketDao.queryTotal(map);
	}
	
	@Override
	public void save(MarketEntity market){
		market.setCreateTime(new Date());
		marketDao.save(market);
	}
	
	@Override
	public void update(MarketEntity market){
		marketDao.update(market);
	}
	
	@Override
	public void delete(Long dataId){
		marketDao.delete(dataId);
	}
	
	@Override
	public void deleteBatch(Long[] dataIds){
		marketDao.deleteBatch(dataIds);
	}
	
}
